﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WordXmlComparer
{
    public partial class frmOptions : Form
    {
        public frmOptions()
        {
            InitializeComponent();
        }

        private void frmOptions_Load(object sender, EventArgs e)
        {
            // get the options from the app config
            txtCompareExe.Text = AppSettings.CompareExePath;
            txtCompareExeArguments.Text = AppSettings.CompareExeArguments;
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            // save the options to the app config
            AppSettings.CompareExePath = txtCompareExe.Text;
            AppSettings.CompareExeArguments = txtCompareExeArguments.Text;
            Close();
        }

        private void btnBrowse_Click(object sender, EventArgs e)
        {
            DialogResult result = openFileDialog1.ShowDialog();
            if (result == DialogResult.OK)
            {
                txtCompareExe.Text = openFileDialog1.FileName;
            }
        }
    }
}
